package de.koller.zero.engine.commands;

import de.koller.zero.arch.CTTZNode;
import de.koller.zero.arch.ICommand;

public class UpdateRound implements ICommand {
	
	private int roundNumber;

	public UpdateRound( int roundNumber ) {
		this.roundNumber = roundNumber;
	}

	@Override
	public void handleCommand( CTTZNode engine ) {
		engine.updateNode();
		roundNumber--;
		
		if( roundNumber > 0 )
			engine.call( this );
	}

}
